import request from '@/utils/adminrequest'

export function getList(params) {
  return request({
    // url: 'http://127.0.0.1:19090/chat/findlist',
    url: '/table/list',
    method: 'get',
    params: params
  })
}
//敏感用户
export function addSensitiveUser(params) {
  return request(
    {
      url: '/sensitiveUser',
      method: 'POST',
      data: params.data
    }
  )
}

export function updateSensitiveUser(params) {
  return request(
    {
      url: '/sensitiveUser',
      method: 'PUT',
      data: params
    }
  )
}

export function getSensitiveUsers(params) {
  return request({
    url: '/sensitiveUser',
    method: 'get',
    params: params
  })


}

export function deleteSensitiveUser(id) {
  return request({
    url: '/sensitiveUser/'+id,
    method: 'delete',
    params: id
  })
}

export function batchInsertSensitiveUser(params) {
  return request({
    url: '/sensitiveUser/batchInsert',
    method: 'post',
    params: {userIds:params.data}
  })
}
export function getmessageNumber(pv){
  return request({
    url: '/table/getmessageNumber',
    method: 'get',
    // params: params
  })

}
//消息检索
export function messageSearch(params) {
  return request({
    url: '/messageSearch/',
    method: 'get',
    params: params
  })
}

//消息检索页面中标记敏感用户接口
export function markUser(params) {
  return request({
    url: '/sensitiveUser/mark',
    method: 'put',
    data: params
  })

}
//面板统计数量
export function getCount(params) {
  return request({
    url: '/dashboard/getCount',
    method: 'get',
    params: params
  })
}
//面板曲线图
export function getChart(params) {
  return request({
    url: '/dashboard/getChart',
    method: 'get',
    params: params
  })
}

//异常消息获取
export function getException(params) {
  return request({
    url: '/exception/getException',
    method: 'get',
    params: params
  })
}

//异常消息已读
export function checkException(params) {
  return request({
    url: '/exception/check/',
    method: 'put',
    params: params
  })
}

//敏感用户最近发言获取
export function getSpoken(params) {
  return request({
    url: '/sensitiveUser/recentlySpoken',
    method: 'get',
    params: params
  })
}

export function getAccount(params) {
  return request({
    url: '/table/getAccount',
    method: 'get',
    params: params
  })
}
